package org.example.lotterysystem.service.enums;

public enum ActivityUserStatusEnum {

    INIT(1,"初始化"),

    COMPLETED(2,"已被抽取");



    private final Integer code;
    private final String message;


    ActivityUserStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static ActivityUserStatusEnum forname(String name){
        for (ActivityUserStatusEnum activityUserStatusEnum:ActivityUserStatusEnum.values()) {
            if(activityUserStatusEnum.name().equalsIgnoreCase(name)){
                return activityUserStatusEnum;
            }
        }
        return null;
    }
}
